-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
qt5.qtbase: ignore hook propagated from buildPlatform #264964
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
github-actions
bot
added
6.topic: python
6.topic: nixos
Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS
6.topic: haskell
6.topic: kernel
The Linux kernel
8.has: documentation
8.has: changelog
8.has: module (update)
This PR changes an existing module in `nixos/`
6.topic: printing
6.topic: rust
6.topic: ruby
6.topic: vim
6.topic: ocaml
6.topic: fetch
6.topic: steam
6.topic: stdenv
Standard environment
6.topic: nodejs
6.topic: lua
6.topic: systemd
labels
Nov 2, 2023
ofborg
bot
added
10.rebuild-darwin-stdenv
This PR causes stdenv to rebuild
10.rebuild-linux-stdenv
This PR causes stdenv to rebuild
8.has: clean-up
8.has: package (new)
This PR adds a new package
10.rebuild-darwin: 5001+
10.rebuild-linux: 5001+
labels
Nov 2, 2023
ghost
marked this pull request as ready for review
November 3, 2023 02:54
ghost
requested a review
from Artturin
November 3, 2023 02:54
Artturin
reviewed
Nov 3, 2023
ghost
marked this pull request as draft
November 4, 2023 01:07
ghost
marked this pull request as ready for review
November 4, 2023 05:46
ghost
mentioned this pull request
Nov 4, 2023
13 tasks
|
Rebased, maybe this time LLVM won't time out. |
ghost
mentioned this pull request
Nov 4, 2023
13 tasks
ghost
marked this pull request as draft
November 12, 2023 00:09
broken by "qt5.wrapQtAppsHook: move libs to depsTargetTargetPropagated" qtbase propagates a lot of stuff frescobaldi> msgcat -o - frescobaldi/cs.po userguide/cs.po | msgfmt -o ../frescobaldi_app/i18n/cs.mo - frescobaldi> sh: line 1: msgcat: command not found frescobaldi> sh: line 1: msgfmt: command not found
…denvs The main headache with cross-compiling QT is that our QT derivations go bananas with propagatedInputs. Unfortunately this means that both buildPackages.qtbase and hostPackages.qtbase get propagated into the dependencies of every cross-compiled builds, which triggers the hook check. Previously in #227900 I simply disabled the check outright for cross-compiled builds. This is a more refined solution, where we skip the hook if it propagates across a platform change.
ghost
marked this pull request as ready for review
November 12, 2023 00:12
13 tasks
Artturin
reviewed
Nov 25, 2023
@@ -353,7 +351,8 @@ let | |||
|
|||
wrapQtAppsHook = callPackage ({ makeBinaryWrapper, qtbase, qtwayland }: makeSetupHook { | |||
name = "wrap-qt5-apps-hook"; | |||
propagatedBuildInputs = [ qtbase.dev makeBinaryWrapper ] | |||
propagatedBuildInputs = [ makeBinaryWrapper ]; | |||
depsTargetTargetPropagated = [ qtbase.dev ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what about the build tools?
Artturin
reviewed
Nov 25, 2023
@@ -391,6 +391,7 @@ stdenv.mkDerivation (finalAttrs: ({ | |||
dontStrip = debugSymbols; | |||
|
|||
setupHook = ../hooks/qtbase-setup-hook.sh; | |||
env.qtbase_stdenv = stdenv.outPath; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This overrides env, has to be moved to the env block
qtbase-aarch64-unknown-linux-gnu> qxcbcursor.cpp: In constructor 'QXcbCursor::QXcbCursor(QXcbConnection*, QXcbScreen*)':
qtbase-aarch64-unknown-linux-gnu> qxcbcursor.cpp:320:43: error: 'NIXPKGS_LIBXCURSOR' was not declared in this scope
qtbase-aarch64-unknown-linux-gnu> 320 | QLibrary xcursorLib(QLatin1String(NIXPKGS_LIBXCURSOR), 1);
qtbase-aarch64-unknown-linux-gnu> | ^~~~~~~~~~~~~~~~~~
ghost
closed this
Jan 23, 2024
ghost
deleted the
qt5-skip-hook-propagated-across-platform-boundary
branch
January 23, 2024 06:51
This pull request was closed.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Includes
Description of changes
The main headache with cross-compiling QT is that our QT derivations go bananas with
propagatedInputs
. Unfortunately this means that bothbuildPackages.qtbase
andpkgs.qtbase
get propagated into the dependencies of every cross-compiled build, which triggers the hook check:nixpkgs/pkgs/development/libraries/qt-5/hooks/qtbase-setup-hook.sh
Lines 1 to 9 in feaa219
Previously in #227900 I simply disabled the check outright for cross-compiled builds. This is a more refined solution, where we skip the hook if has a different
stdenv.outPath
than the derivation being built.This works because the outpath of
stdenv
is written into the environment of every derivation. There's nothing else we can use that's guaranteed to be in every derivation thatqtbase-setup-hook.sh
is propagated into.We should stop using
propagatedBuildInputs
.Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)